{% extends "templates/main_template.html.j2" %}


{% block title %}Типы запросов · Farado{% endblock %}

{% set active_menu = 'issue_kinds' %}


{#----------------------------------------------------------------------------#}
{% block styles %}
  <link href="/static/css/page-toolbar.css" rel="stylesheet" type="text/css" />
{% endblock %}


{#----------------------------------------------------------------------------#}
{% block breadcrumb %}
  <ol class="breadcrumb">
    <li class="breadcrumb-item active" aria-current="page">Типы запросов</li>
  </ol>
{% endblock %}


{#----------------------------------------------------------------------------#}
{% block content %}
  <div class="page-toolbar">
    <a href="/issue_kinds/add_issue_kind"
        class="btn btn-outline-primary btn-sm"
        role="button"
        aria-pressed="true">
      <i class="bi bi-plus mr-1"></i> Добавить запрос
    </a>
  </div>

  <div class="row placeholders mt-4">
    <table class="table">
      <thead class="table-dark">
        <tr>
          <th scope="col" style="width: 1%">№</th>
          <th scope="col">Название</th>
          <th scope="col">Рабочий процесс</th>
        </tr>
      </thead>
      <tbody>
        {% for issue_kind in project_manager.issue_kinds() %}
        <tr>
          <th scope="row">{{ issue_kind.id }}</th>
          <td>
            <a href="/issue_kinds/issue_kind/{{ issue_kind.id }}">
              {{ issue_kind.caption|e }}
            </a>
          </td>
          <td>
            {% set workflow = project_manager.workflow(issue_kind.workflow_id) %}
            {{ workflow.caption|e if workflow is not none else '—' }}
          </td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
{% endblock %}


{#----------------------------------------------------------------------------#}
{% block scripts %}
{% endblock %}
